import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
import java.io.File;

public class ListenerKey implements KeyListener {

	Peca pecaSelecionada = null;

	@Override
	public void keyPressed(KeyEvent e) {

		switch (e.getKeyCode()) {
		case KeyEvent.VK_LEFT:
			Mundo.getInstancia().panEsquerda();
			break;
		case KeyEvent.VK_RIGHT:
			Mundo.getInstancia().panDireita();
			break;
		case KeyEvent.VK_DOWN:
			Mundo.getInstancia().panBaixo();
			break;
		case KeyEvent.VK_UP:
			Mundo.getInstancia().panCima();
			break;
		case KeyEvent.VK_P:
			Controle.getControle().printTabuleiro();
			break;

		case KeyEvent.VK_C:
			Mundo.getInstancia().writeBufferToFile(Mundo.getInstancia().getGlDrawable(), new File("c:/printeia.png"));
			break;
		}
	}

	@Override
	public void keyReleased(KeyEvent arg0) {
	}

	@Override
	public void keyTyped(KeyEvent arg0) {
	}

}
